# jQuery pagecontainerload Event

jQuery Mobile Events

## Example

Alert some text when the external page has been successfully loaded and inserted into the DOM:

$(document).on("pagecontainerload",function(){
alert("pagecontainerload event fired!");
});
Try it yourself »

## Definition and Usage

The pagecontainerload event is triggered after the page has been successfully loaded and inserted into the DOM.

Related events:

- pagecontainerbeforeload - triggered before any load request is made
- pagecontainerloadfailed - triggered if the page load request fails

Note: These events are used for external pages - Whenever an external page is loaded into the DOM, 2 events are fired. The first is pagecontainerbeforeload. The 2nd event will either be pagecontainerload or pagecontainerloadfailed.

## Syntax

$("document").on("pagecontainerload",function(event,data){...})

Parameter | Description
--- | ---

function(event,data)

Required. Specifies the function to run when the pagecontainerload event occurs.

The function has two optional parameters:

The event object - which can contain any jQuery event properties (e.g. event.target, event.type, etc.) See jQuery Events Reference for more information

The data object - contains the following:

- url (string) - contains the absolute or relative URL of the page (that was sent to $.mobile.loadPage())
- absUrl (string) - contains the absolute reference of the URL
- dataUrl (string) - contains the URL of the browser's location
- options (object) - contains the options that were sent to $.mobile.loadPage()
- xhr (object) - contains the XMLHttpRequest object (Sent as the 3rd argument to $.ajax() success callback)
- textStatus (string or null) - contains the status of the request ("success" or "null") (Sent as the 2nd argument to $.ajax() error callback)

## Try it Yourself - Examples

A demonstration of related events
A demonstration of pagecontainerload and pagecontainerloadfailed.

The event object
Using the event.type property to return the triggered event type.

The data object
Using data.url to return the URL of the external page.

jQuery Mobile Events

### WEB HOSTING

UK Reseller Hosting

### WEB BUILDING

FREE Website BUILDER Free HTML5 Templates

### W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

### SHARE THIS PAGE

### Color Picker

### HTML/CSS

HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial Bootstrap Tutorial

### JavaScript

JavaScript Tutorial jQuery Tutorial jQuery Mobile Tutorial AngularJS Tutorial AJAX Tutorial JSON Tutorial

### Graphics

Canvas Tutorial SVG Tutorial Google Maps Tutorial

### Server Side

SQL Tutorial PHP Tutorial ASP Tutorial ASP.NET Tutorial VBScript Tutorial AppML Tutorial

### Web

Web Building Web Statistics Web Certification

### XML

XML Tutorial DTD Tutorial Schema Tutorial XML DOM Tutorial XPath Tutorial XSLT Tutorial XQuery Tutorial XSL-FO Tutorial RSS Tutorial WSDL Tutorial

### HTML/CSS

HTML Tag Reference HTML Event Reference HTML Color Reference CSS 1,2,3 Reference Bootstrap Reference

### JavaScript

JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference Google Maps Reference

### Server Side

PHP Reference SQL Reference ASP Reference VBScript Reference Razor Reference ASP.NET Reference

### XML

XML DOM Reference XSLT Reference XSL-FO Reference XPath Reference XQuery Reference Schema Reference RSS Reference SVG Reference

### HTML Charsets

HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8

### HTML/CSS

HTML Examples CSS Examples

### Browser Scripting

JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples

### Server Scripting

PHP Examples ASP Examples VBScript Examples Razor Examples .NET Examples

### XML Languages

XML Examples DTD Examples XML DOM Examples XSL Examples XSLT Examples XPath Examples XQuery Examples Schema Examples RSS Examples SVG Examples